1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36 package net.sf.pmr.agilePlanning.domain.story.task;
37
38 import net.sf.pmr.core.domain.user.User;
39 import net.sf.pmr.keopsframework.domain.object.AbstractDomainObject;
40
41 import org.apache.commons.lang.builder.EqualsBuilder;
42 import org.apache.commons.lang.builder.HashCodeBuilder;
43 /***
44 * @author Arnaud Prost (arnaud.prost@gmail.com)
45 *
46 * Task
47 */
48 public class TaskImpl extends AbstractDomainObject implements Task {
49
50 /***
51 * developper
52 */
53 private User developper;
54
55 /***
56 * number of ideal days
57 */
58 private int idealDay;
59
60 /***
61 * short description
62 */
63 private String shortDescription;
64
65 /***
66 * @see net.sf.pmr.agilePlanning.domain.story.task.Task#getDevelopper()
67 */
68 public User getDevelopper() {
69 return this.developper;
70 }
71
72 /***
73 * @see net.sf.pmr.agilePlanning.domain.story.task.Task#setDevelopper(net.sf.pmr.core.domain.user.User)
74 */
75 public void setDevelopper(final User developper) {
76 this.developper = developper;
77 }
78
79 /***
80 * @see net.sf.pmr.agilePlanning.domain.story.task.Task#getIdealDay()
81 */
82 public int getIdealDay() {
83 return this.idealDay;
84 }
85
86 /***
87 * @see net.sf.pmr.agilePlanning.domain.story.task.Task#setIdealDay(int)
88 */
89 public void setIdealDay(final int idealDay) {
90 this.idealDay = idealDay;
91 }
92
93 /***
94 * @see net.sf.pmr.agilePlanning.domain.story.task.Task#getShortDescription()
95 */
96 public String getShortDescription() {
97 return this.shortDescription;
98 }
99
100 /***
101 * @see net.sf.pmr.agilePlanning.domain.story.task.Task#setShortDescription(java.lang.String)
102 */
103 public void setShortDescription(final String shortDescription) {
104 this.shortDescription = shortDescription;
105 }
106
107
108 /***
109 * @see java.lang.Object#equals(Object)
110 */
111 public boolean equals(final Object object) {
112 if (!(object instanceof TaskImpl)) {
113 return false;
114 }
115 TaskImpl rhs = (TaskImpl) object;
116 return new EqualsBuilder().append(this.shortDescription, rhs.shortDescription)
117 .append(this.idealDay, rhs.idealDay)
118 .append(this.developper, rhs.developper)
119 .isEquals();
120 }
121
122 /***
123 * @see java.lang.Object#hashCode()
124 */
125 public int hashCode() {
126 return new HashCodeBuilder(1805961607, 553061543).append(this.shortDescription).append(this.idealDay).append(this.developper).toHashCode();
127 }
128 }